package me.jessyan.mvparms.demo.mvp.model.service;

import io.reactivex.Observable;
import me.jessyan.mvparms.demo.mvp.model.Api;
import me.jessyan.mvparms.demo.mvp.model.entity.BaseJson;
import me.jessyan.mvparms.demo.mvp.model.entity.User;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Headers;
import retrofit2.http.POST;


/**
 * Created by 95 on 2017/8/24.
 */

public interface UserService {
    String HEADER_API_VERSION = "Accept-Encoding: application/json";

    //登录
    @Headers({HEADER_API_VERSION})
    @FormUrlEncoded
    @POST("/api/"+ Api.APP_VERSION+"/user/login")
    Observable<BaseJson<User>> loginByMessageCode(@Field("username") String name, @Field("code") String code, @Field("unique_id") String unique_id);








}
